<?php

namespace plugin\admin\app\controller\withdraw;


use plugin\admin\app\logic\withdraw\WithdrawLogic;
use support\Request;
use support\Response;
use plugin\admin\app\controller\AuthController;
use support\exception\BusinessException;

class IndexController extends AuthController
{
    
    /**
     * 浏览
     * @return Response
     */
    public function index(): Response
    {
        return view('withdraw/index/index');
    }

    /**
     * 查询
     * @param Request $request
     * @return Response
     * @throws BusinessException
     */
    public function select(Request $request): Response
    {
        return WithdrawLogic::getInstance()->select($request);
    }


    /**
     * 更新
     * @param Request $request
     * @return Response
     * @throws BusinessException
    */
    public function update(Request $request): Response
    {
        if ($request->method() === 'POST') {
            return WithdrawLogic::getInstance()->update($request);
        }
    }

    /**
     * 审核
     * @param Request $request
     * @return Response
     * @throws BusinessException
    */
    public function checked(Request $request): Response
    {
        return view('withdraw/index/checked');
    }

}
